<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";

	pageContext.setAttribute("webName", application.getInitParameter("webName"));
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${webName}-登录</title>
<link rel="stylesheet" type="text/css" href="css/reset.css">

<link rel="stylesheet" type="text/css" href="css/login.css">
</head>
<body>

	<div class="logo">
		<a href="index.jsp"> <img src="images/logo-min.gif">
		</a>

	</div>


	<!-- 登录表单 -->
	<div class="login-form">
		<form id="form-1" action="LoginServlet" method="post">
			<ul>
				<li>
					<p class="big-title">用户登录</p>
				</li>

				<li><span class="title">用户类型:</span> <label class="type-1">
						<input type="radio" name="type" value="1"
						${type==1||type!=2?"checked=\"checked\"":""}><span>员工</span>
				</label> <label class="type-2"> <input type="radio" name="type"
						${type==2?"checked=\"checked\"":""} value="2"><span>管理员</span>
				</label> <span class="err-msg" id="ck-type"
					${!empty typeErr ? "style=\"display:block; color:#ffff00;\"":""}>${typeErr}</span>


				</li>


				<li><span class="title">用户名:</span> <input class="input-1"
					type="text" name="userName" placeholder="用户名由5-14位字母或数字组成"
					id="user-name" class="input1" value="${userName}"> <span
					class="err-msg" id="ck-user-name"
					${!empty userNameErr ? "style=\"display:block; color:#ffff00;\"":""}>${userNameErr}</span></li>




				<li><span class="title">密码:</span> <input class="input-1"
					type="password" name="password" placeholder="密码由6-16位字母或数字组成"
					id="pwd" class="input1" value="${password}"> <span
					class="err-msg" id="ck-pwd"
					${!empty pwdErr ? "style=\"display:block; color:#ffff00;\"":""}>${pwdErr}</span></li>



				<li><span class="title">验证码:</span> <input class="input-2"
					type="text" id="verification-code" name="verificationCode"
					placeholder="验证码由4位字母或数字组成" size="4"> <!-- 通过img图片标签的src属性加载验证码随机图片 -->
					<img class="randeCodeImg" src="ImageRandeCode"
					id="verification-code-img" /> <span class="err-msg"
					id="ck-verificationCode"
					${!empty verificationCodeErr ? "style=\"display:block; color:#ffff00;\"":""}>${verificationCodeErr}</span>
					<a href="javascript:;" id="refresh-verification-code"
					class="switch">看不清<br>换一张
				</a></li>



				<li><span class="welcome">欢迎使用${webName}</span> <input
					class="input-reset" type="reset" value="重置"> <input
					class="input-submit" type="submit" value="提交"></li>
			</ul>
		</form>
	</div>

	<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="js/login.js"></script>
</body>
</html>